<?php

class Public_Profile_EditInputView extends BlogPublicBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
		$this->setupHtml($rd, 'blog');
		$ro = $this->getContext()->getRouting();
		$user = $this->getContext()->getUser();

		$form_params = array(
		    'display_name' => $user->getAttribute('display_name'),
		    'email' => $user->getAttribute('email'),
		    'website' => $user->getAttribute('website')
		    );
		    
		$this->getContext()->getRequest()->setAttribute('populate',
            new AgaviParameterHolder($form_params),
            'org.agavi.filter.FormPopulationFilter');
		    
		$this->setAttribute('title', 'Edit my profile');
		$this->setAttribute('login_name', $user->getAttribute('username'));
		$this->setAttribute('submit_route', $ro->gen('own_profile.edit'));
	}
}

?>